package cn.no7player.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.no7player.mapper.UserModelMapper;
import cn.no7player.model.UserModel;
import cn.no7player.utils.MD5Util;
import cn.no7player.utils.UUIDGenerator;

@Service
public class LoginService {
	
	@Autowired
	private UserModelMapper userMapper;
	
	public int addUser(UserModel record){
		
		record.setPassword(MD5Util.Md5(record.getPassword()));
		record.setId(UUIDGenerator.getUUID());
		return userMapper.add(record);
	}
	
	

}
